/*
 * @Author: Cenven
 * @Date: 2021-02-05 14:44:15
 * @Description: 北京泓深教育发展有限公司
 * @Descripttion:
 * @version: @Lastest
 * @LastEditTime: 2021-07-16 11:23:46
 * @CopyRight: 北京泓深教育发展有限公司
 */
import http from "~/utils/http";
export const getGroupBookingListByCourse = data => {
  return http({
    url: "web/groupPurchaseGoods/list",
    method: "post",
    data
  });
};
// 获取我的拼团订单
export const getMyGroupBookingList = data => {
  return http({
    url: "web/goodsTroops/getMyGoodsTroops",
    method: "post",
    data
  });
};

export const getGroupBookingGroupsByCourse = data => {
  return http({
    url: "web/goodsTroops/list",
    method: "post",
    data
  });
};

export const publishGroup = data => {
  return http({
    url: "web/goodsTroops/save",
    method: "post",
    data
  });
};

export const joinGroup = data => {
  return http({
    url: "web/goodsTroops/update",
    method: "post",
    data
  });
};

export const getGroupBookingGroupsByCourseAndUser = data => {
  return http({
    url: "web/goodsTroops/isexist",
    method: "post",
    data
  });
};

export const getGroupBookingGroupsById = id => {
  return http({
    url: "web/goodsTroops/selectOne?id=" + id,
    method: "get"
  });
};

export const groupGoodsBuy = data => {
  return http({
    url: "web/groupPurchaseGoods/buy",
    method: "post",
    data
  });
};

export const getCurrentGroupWork = data => {
  return http({
    url: "client/getCurrentGroupWork",
    method: "post",
    data
  });
};
